This application relates to creating and rendering 3D surfaces in a computer system.
Many computer graphics applications render complex three-dimensional (3D) surface geometries by iteratively refining simple, coarse 3D geometries, known as xe2x80x9cbase meshes.xe2x80x9d In general, each base mesh is a collection of triangle faces, in which trios of adjacent points, or vertices, are connected to form an approximation of a 3D surface. This approximation represents a coarse approximation of a more complex, ideal 3D surface, known as a xe2x80x9climit subdivision surface,xe2x80x9d or xe2x80x9climit surface.xe2x80x9d
A computer creates an initial xe2x80x9csubdivision surfacexe2x80x9d from a base mesh by applying a computational kernel, known as a xe2x80x9csubdivision kernel,xe2x80x9d to the triangles and vertices in the base mesh. Repeated and recursive application of the subdivision kernel yields increasingly smooth meshes that converge at the limit surface as the number of iterations approaches infinity.
Producing a subdivision surface typically involves computing a weighted midpoint between each pair of vertices in each triangle (i.e., along each edge in the mesh) and then connecting the midpoints, or xe2x80x9ctessellatingxe2x80x9d the triangle, to create four smaller triangles. The time required to subdivide a 3D surface mesh depends upon the technique used in tessellating the triangles in the mesh. More efficient tessellation techniques reduce processing time and therefore improve rendering speed.
In rendering 3D surfaces, computers must often calculate surface normal vectors to ensure realistic light shading of the surfaces. Simple lighting models use the angle between a surface normal vector and a vector in the direction of the light source to calculate how much light strikes the surface at a corresponding vertex. In general, the computer must compute a surface normal vector for each new vertex produced in the subdivision surface computations. As with tessellation, more efficient surface normal calculation reduces processing time and therefore improves rendering speed.
In rendering an image of a 3D surface, a computer system obtains a digital model that includes data points defining vertices for triangles that represent 2D faces of the 3D surface. The computer also obtains a plurality of vectors, each defining a surface normal for the 3D surface at a corresponding one of the vertices. The computer applies an algorithm, such as a Butterfly Subdivision Scheme, to the data points to create new data points defining new vertices that subdivide the triangles into smaller triangles. The computer applies the same algorithm to the vectors to calculate new vectors, each defining a surface normal at a corresponding one of the new vertices.
Other embodiments and advantages will become apparent from the following description and from the claims.